package com.coin.exchange.ether.api.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Value;

import com.coin.exchange.ether.api.EtherApi;
import com.coin.exchange.okcoin.rest.HttpUtil;

public class EtherApiImpl implements EtherApi {

	@Value("${ether.api.url}")
	private String url_prex;

	@Override
	public String getEtherBalance(String address, String apiKey) throws Exception {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("module", "account");
		params.put("action", "balance");
		params.put("tag", "latest");
		params.put("address", address);
		params.put("apikey", "apiKey");
		String result = HttpUtil.get(url_prex, params);
		return result;
	}
	
}
